import type { AppRouteRecordRaw } from "../types";

import { PAGE_NOT_FOUND_NAME, REDIRECT_NAME, LAYOUT } from "@/router/constant";
import tooltip from "./modules/test";

//重定向
export const REDIRECT_ROUTE: AppRouteRecordRaw = {
  path: "/redirect",
  component: LAYOUT,
  name: "RedirectTo",
  meta: {
    title: REDIRECT_NAME,
  },
};

// 404
export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
  // 将匹配所有内容并将其放在 `$route.params.path` 下
  path: "/:path(.*)*",
  name: PAGE_NOT_FOUND_NAME,
  component: LAYOUT,
  meta: {
    title: "ErrorPage",
  },
};
// 404
export const basicRoutes: AppRouteRecordRaw[] = [
  REDIRECT_ROUTE,
  PAGE_NOT_FOUND_ROUTE,
  tooltip,
];
